package com.hcs.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author hcs
 * @since 2025-01-12 09:26
 */
@Getter
@Setter
@TableName("user_role")
@Schema(name = "user_role", description = "用户角色关联表")
public class UserRole {

    // 主键
    @Schema(description = "关联 `user` 表")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    // 主键
    @Schema(description = "关联 `role` 表")
    @TableField(value = "role_id")
    private Long roleId;

    // 创建时间
    @Schema(description = "创建时间")
    @TableField("created_at")
    private Date createdAt;
}
